<template>
    <div class="bannerList">
        <van-swipe :autoplay="2000" indicator-color="white">
            <van-swipe-item v-for="(item,index) in bannerList"><img v-lazy="item.image" alt="item.title"></van-swipe-item>
        </van-swipe>
    </div>
</template>

<script>
    import {getBannerImg} from "../../api/list/list";

    export default {
        name: 'Banner',
        components: {

        },
        data(){
            return{
                bannerList:[]
            }
        },
        created() {
            getBannerImg().then((res)=>{
                let data = res.data.data
                this.bannerList = data
            })
        }
    }
</script>
<style lang="less" scoped>
    img{
        width: 100%;
        height: 3.2rem;
        display: block;
    }
</style>